
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>发现</title>
    <script>
  
    </script>
    <link rel="stylesheet" type="text/css" href="../css/common.css" />
    <style>
        


        .backf7{ background-color: #f7f7f7; }  
.bdlist{ margin: 14px 12px ; display: flex;    flex-wrap: wrap; }
.bdlistli30 { font-size: 16px; margin:12px 2px ; width: 23%; }
.bdlistli { font-size: 16px; margin:12px 2px ; width: 46%; }
.bdlistli100 { font-size: 16px; margin:12px 2px ; width: 98%; }
 
</style>
</head>

<body>
    <div class="page backf7"  @vue:mounted="mounted">
        <div class="nav-bar">
            <span class="nav-bar-title">任务</span>
        </div>
        <div class="scroll-view-y "  >
            <div class="bdlist">
                <div v-for="item of data.urls.bd" 
                @click="gourl2(item)" 
                :class="item[0].length<10? (item[0].length<7?'bdlistli30':'bdlistli'): 'bdlistli100'"
                
                >{{item[0]}}</div>
                 <div v-for="item of data.urls.cctv" 
                @click="gourl2(item)" class="bdlistli30">{{item[0]}}</div>
                        
               
                <div  
                @click="setScreen()" class="bdlistli30" style="color: #2e46e4;">全屏</div>
                <div v-for="item of data.bddata" 
                @click="gourl2([0,item.u])" class="bdlistli100">{{item.l}}</div>
        
            </div>
    </div>
    </div>
</body>

<script src="../script/api.js"></script>
<script src="../script/common.js"></script>


<script  type="module">
     import { createApp } from 'https://www.chenxiangle.com/app/web/script/pvue.js';
    import ads  from  '../script/ads.js'
    import addata  from  '../script/addata.js?as'
    import bddata  from  'https://hc.6gcc.com/baidulist2.js'  ; 
    const APP = ()=>{
        createApp({
        data:  { 
            title:"" ,
            stype:true,
            taskList:[],
            taskListKa:[],
            uid:0,
            sys:'',
            coinLock:0,
            coinOK:0,
            coinM:0,
            urls:addata.data ,
            bddata:bddata.data ,
            timer : null  ,
            
        },
        setScreen(){
            this.data.stype = !this.data.stype;
            if(this.data.stype){
                api.setScreenOrientation({ orientation: 'landscape_left'});
            }else{
                api.setScreenOrientation({ orientation: 'auto'});
            }
        },
       
     gourl(u){
        api.openWin({
            name: 'baiduurl' ,
            url: u,
        })
     },
     setBaiduTimer(){
        if(this.data.timer!=null){
                    clearInterval(this.data.timer);
                }
             
                this.data.timer  = setInterval(() => {
                   
                    let js = `
                    var isAndroid2 = (/android/gi).test(navigator.appVersion);
	                var uzStorage2 = isAndroid2 ? os.localStorage() : window.localStorage;
     
                     var vdata  = uzStorage2.getItem('userinfo');
              vdata = vdata.slice(4);
                var udata =  JSON.parse(vdata); 
                    var tt = window.document.title; 
                    var  uu = window.location.href; console.log(uu);
                      var dt ={u:uu ,t:tt,udata:udata}; 
                       api.ajax({ url:'https://hc.6gcc.com/appad/baidulog',  
                       data:{ values: dt  } ,  headers: { },    method:'post'  },
                       function(ret,error){ 
                                if(ret.code==200){
                                    api.toast({  msg:   JSON.stringify(ret.msg)});
                                }else if(ret.code==201) {
                                    api.alert({msg: JSON.stringify(ret.msg) });
                                }
                         });  `;

                    api.execScript({
                            name: 'baiduurl2',
                            script:  js 
                        });             
            }, 6000)
     },
     gourl2(item){
        var deviceid = api.deviceId;
        console.log("deviceid :"+ deviceid );
        this. setBaiduTimer();
        let u = item[1]
        api.openWin({
            name: 'baiduurl2' ,
            url: u,
        })
     },
     refresh(){
        window.location.href="./find.html?=" +Math.random();
     }, 
    initCSJ(){
        if( api.systemType=="android"){
                  ads.initAdCSJ();
             }
    },
    gotoBaidu(){
        let url  = "https://cpu.baidu.com/1021/ce949f63";
            api.openWin({
                    name: 'baiduurl2' ,  url 
                })
    },
  
    mounted() {

            window.app = this ; 
            core.getUIdFromUrl();
        
            this.initCSJ();
            this.data.uid = core.uid();
            this.data.sys =  api.systemType;
        
            core.addLog("visit","task", "进入发现");
 
            var  hhh = core.getParam("hhh");
            if(hhh== '123' ) return;
 
          this.setBaiduTimer();
          return;
          this.gotoBaidu();
             }
      }).mount( )
    }

    window.apiready = ()=> {
        $api.fixStatusBar($api.dom('.nav-bar'));
        APP(); 
    }
</script>
 

</html>